package cn.java71.dao;

import cn.java71.entity.Grade;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GradeDao {
//    @Select("select * from s_grade")
//    @ResultType(Grade.class)
    public List<Grade> findALL();


//    @Select("select * from s_grade where gname like \"%\"#{gname}\"%\"")
//    @ResultType(Grade.class)
    //public List<Grade> search(@Param("gname") String gname);

    //根据年级名字查找年级信息
    public Grade find(String gname);


    //同时读取年级和课程信息
    public List<Grade> findALLWithSubs();

    public List<Grade> findALLWithSubs2();
}
